
  // 日期范围 - 左右面板联动选择模式
layui.use(function(){
  var laydate = layui.laydate;
  laydate.render({
    elem: '#ID-laydate-rangeLinked',
    range: ['#ID-laydate-start-date-1', '#ID-laydate-end-date-1'],
    rangeLinked: true 
  });

});

// 切换分类标签
document.querySelectorAll('#categoryTabs .nav-link').forEach(link => {
    link.addEventListener('click', function(e) {
        e.preventDefault();
        
        // 移除所有active类
        document.querySelectorAll('#categoryTabs .nav-link').forEach(el => {
            el.classList.remove('active');
        });
        document.querySelectorAll('.page-section').forEach(el => {
            el.classList.remove('active');
        });
        
        // 添加当前active类
        this.classList.add('active');
        const target = this.getAttribute('data-target');
        document.getElementById(target).classList.add('active');
    });
});
